<div class="contratos view">
<h2><?php  echo __('Contrato'); ?></h2>
	<dl>
		<dt><?php echo __('Id'); ?></dt>
		<dd>
			<?php echo h($contrato['Contrato']['id']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Fecha'); ?></dt>
		<dd>
			<?php echo h($contrato['Contrato']['fecha']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Fecha Inicio'); ?></dt>
		<dd>
			<?php echo h($contrato['Contrato']['fecha_inicio']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Fecha Fin'); ?></dt>
		<dd>
			<?php echo h($contrato['Contrato']['fecha_fin']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('User'); ?></dt>
		<dd>
			<?php echo $this->Html->link($contrato['User']['id'], array('controller' => 'users', 'action' => 'view', $contrato['User']['id'])); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Fecha Alta'); ?></dt>
		<dd>
			<?php echo h($contrato['Contrato']['fecha_alta']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Fecha Modificacion'); ?></dt>
		<dd>
			<?php echo h($contrato['Contrato']['fecha_modificacion']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Tipo Contrato'); ?></dt>
		<dd>
			<?php echo $this->Html->link($contrato['TipoContrato']['id'], array('controller' => 'tipo_contratos', 'action' => 'view', $contrato['TipoContrato']['id'])); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Propiedad'); ?></dt>
		<dd>
			<?php echo $this->Html->link($contrato['Propiedad']['zona_id'], array('controller' => 'propiedades', 'action' => 'view', $contrato['Propiedad']['id'])); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Comentarios'); ?></dt>
		<dd>
			<?php echo h($contrato['Contrato']['comentarios']); ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Edit Contrato'), array('action' => 'edit', $contrato['Contrato']['id'])); ?> </li>
		<li><?php echo $this->Form->postLink(__('Delete Contrato'), array('action' => 'delete', $contrato['Contrato']['id']), null, __('Are you sure you want to delete # %s?', $contrato['Contrato']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('List Contratos'), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Contrato'), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Users'), array('controller' => 'users', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New User'), array('controller' => 'users', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Tipo Contratos'), array('controller' => 'tipo_contratos', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Tipo Contrato'), array('controller' => 'tipo_contratos', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Propiedades'), array('controller' => 'propiedades', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Propiedad'), array('controller' => 'propiedades', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Contrato Clientes'), array('controller' => 'contrato_clientes', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Contrato Cliente'), array('controller' => 'contrato_clientes', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Contrato Planpagos'), array('controller' => 'contrato_planpagos', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Contrato Planpago'), array('controller' => 'contrato_planpagos', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php echo __('Related Contrato Clientes'); ?></h3>
	<?php if (!empty($contrato['ContratoCliente'])): ?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Contrato Id'); ?></th>
		<th><?php echo __('Cliente Id'); ?></th>
		<th><?php echo __('Tipo Cliente Id'); ?></th>
		<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($contrato['ContratoCliente'] as $contratoCliente): ?>
		<tr>
			<td><?php echo $contratoCliente['contrato_id']; ?></td>
			<td><?php echo $contratoCliente['cliente_id']; ?></td>
			<td><?php echo $contratoCliente['tipo_cliente_id']; ?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'contrato_clientes', 'action' => 'view', $contratoCliente['id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'contrato_clientes', 'action' => 'edit', $contratoCliente['id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'contrato_clientes', 'action' => 'delete', $contratoCliente['id']), null, __('Are you sure you want to delete # %s?', $contratoCliente['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Contrato Cliente'), array('controller' => 'contrato_clientes', 'action' => 'add')); ?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php echo __('Related Contrato Planpagos'); ?></h3>
	<?php if (!empty($contrato['ContratoPlanpago'])): ?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Contrato Id'); ?></th>
		<th><?php echo __('Monto'); ?></th>
		<th><?php echo __('Fecha Desde'); ?></th>
		<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($contrato['ContratoPlanpago'] as $contratoPlanpago): ?>
		<tr>
			<td><?php echo $contratoPlanpago['contrato_id']; ?></td>
			<td><?php echo $contratoPlanpago['monto']; ?></td>
			<td><?php echo $contratoPlanpago['fecha_desde']; ?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'contrato_planpagos', 'action' => 'view', $contratoPlanpago['id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'contrato_planpagos', 'action' => 'edit', $contratoPlanpago['id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'contrato_planpagos', 'action' => 'delete', $contratoPlanpago['id']), null, __('Are you sure you want to delete # %s?', $contratoPlanpago['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Contrato Planpago'), array('controller' => 'contrato_planpagos', 'action' => 'add')); ?> </li>
		</ul>
	</div>
</div>
